//------------------------------------------------------------------------------ 
//      Copyright (c) 2004-2009, Be Nanashi-San 
// 
//      Permission is hereby granted, free of charge, to any person obtaining a 
//      copy of this software and associated documentation files (the "Software"), 
//      to deal in the Software without restriction, including without limitation 
//      the rights to use, copy, modify, merge, publish, distribute, sublicense, 
//      and/or sell copies of the Software, and to permit persons to whom the 
//      Software is furnished to do so, subject to the following conditions: 
// 
//      The above copyright notice and this permission notice shall be included in 
//      all copies or substantial portions of the Software. 
// 
//      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
//      IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
//      FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
//      AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
//      LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
//      FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
//      DEALINGS IN THE SOFTWARE. 
// 
//      File Name:   mainWindow.h
//      Author:      Be Nanashi-San 
//      Description: 	 
//------------------------------------------------------------------------------
#ifndef MAIN_WINDOW_H_INCLUDED
#define MAIN_WINDOW_H_INCLUDED

class BMenu;
class BMenuBar;
class BMessage;
class BWindow;
class BoardListView;
class DisplayThreadView;
class StatusBarView;
class ThreadListView;
class Bookmark2ch;
class BHander;
class BMessage;
class History;
class BTabView;

class mainWindow : public BWindow 
{
public:
	mainWindow(BRect frame); 
	void AddHistory(BMessage &m);
void DeleteHistoryMenu();
void DispHistory();

private:
	virtual bool QuitRequested();
	virtual void DispatchMessage(BMessage *msg, BHandler *handler);
	virtual void MessageReceived(BMessage *message);
	virtual void MenusBeginning();
	void SetupMenu(BMenuBar *menubar);
	void SetupContents();
	bool CurrentQuery(BMessage *query);
	void Broadcast(BMessage *msg);
	void Back();
	void Forward();
	void DispRange(BString &s, const char *msg);
	DisplayThreadView * ActiveDisplayThreadView();
	void AddNewTab();
	BoardListView *fBoardListView;
	ThreadListView *fThreadListView;
	DisplayThreadView *fDisplayThreadView;
	BTabView *fTabView;
	BMenu *fEditMenu;
	BMenu *fBoardMenu;
	BMenu *fThreadMenu;
	BMenu *fBookmarkMenu;
	BMenu *fBistoryMenu;
	StatusBarView* fStatusBar;
	Bookmark2ch *fBookmark;
	History *fHistory;
};

#endif //MAIN_WINDOW_H_INCLUDED
